import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mac
 * Date: 2022-11-07
 * Time: 16:57
 */
public class Test {
    //1.C 2.A 3.B 4.C 5.B 6.C 7.C 8.C 9.B 10.C 11.A 12.B 13.C 14.B 15.A

    //编程题1 - Fibonacci数列
    public static int func(int n) {
        int ret = 0;
        int f1 = 0;
        int f2 = 1;
        int f3 = -1;
        while (f3 < n){
            f3 = f1 + f2;
            if (f3 >= n){
                break;
            }
            f1 = f2;
            f2 = f3;
        }
        return Math.min(Math.abs(f3 - n), Math.abs(f2 - n));
    }

    //编程题2
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Set<String> set = new HashSet<>();
        while (scanner.hasNextLine()){
            String str = scanner.nextLine();
            //分割函数
            String[] strs = str.split(" ");
            for (String s: strs){
                set.add(s);
            }
        }
        System.out.println(set.size());
    }
}
